<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/22
  Time: 16:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--    meta 计算当前浏览器的宽度 ，
    如果小于某个宽度则变成手机端，则用a.css，如果大于某个宽度，则用b.css-->
    <!--  一般需要讲标题的内容用作展示，用作百度优化，百度收索，蚂蚁爬虫-->
    <title>万息集团-餐饮</title>
    <link rel="stylesheet" href="../css/home.css">
    <%--    <script src="../js/jquery-3.6.0.min.js"></script>--%>
    <%--    <script src="../js/topfoot.js"></script>--%>
</head>

<body>
<div class="home">
    <jsp:include page="top.jsp"></jsp:include>
    <div class="middle">
        <div>
            <div>
                <div class="title">较新动态</div>
                <div class="news">
                    <div><img src="../img/m331.jpg"/></div>
                    <div>
                        <c:forEach items="${newsModels}" var="model">
                            <div>
                                <div onclick="location.href='/newsDetail?id=${model.id}';"
                                     title="${model.title}"><a
                                        href="#">
                                        ${model.title}</a>
                                </div>
                                <div>${model.content}</div>
                            </div>
                        </c:forEach>

                    </div>
                </div>
            </div>
            <div>
                <div class="title">产品展示</div>
                <div class="product">
                    <c:forEach items="${productModels}" var="model">
                        <div>
                            <div><img src="${model.img}" height="300" width="300"/></div>
                            <div>${model.title}</div>
                            <div>${model.content}</div>
                        </div>
                    </c:forEach>

                </div>
            </div>
        </div>
    </div>
    <jsp:include page="foot.jsp"></jsp:include>
    <!--以后js取得对象用id，css取得对象用class-->
    <!--    <script type="text/javascript">-->
    <!--        //在js中引入-->
    <!--        $(document).ready(function () {-->
    <!--            $('#top').load('top.html');-->
    <!--            $('#foot').load('foot.html');-->
    <!--        });-->
    <!--    </script>-->
</div>
</body>
</html>